#!/usr/bin/python3

from baseSql import *
from oracleDB import COracleDB
from log import CLog
from dbPool import *

class CExchageMgr:
    tableTitle =["所有交易所", 0]
    def __init__(self, log):
        self.log=log
        # 交易所名称
        self.exchangeList=[self.tableTitle]

    def init(self, db):
        self.db = db
        self.reload()

    def reload(self):
        self.exchangeList=[self.tableTitle]
        self.db.query(queryAllTableSql + t_exchange )
        datas = self.db.getData()
        for row in datas:
            self.exchangeList.append([row[0], row[1]])